﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Demo.OData.CustomService
{
  //Entity class
  public partial class Product
  {
    internal class Metadata
    {
      [Key]
      [Editable(false, AllowInitialValue = true)]
      public global::System.Guid ProductID { get; set; }

      [Display(Name = "product_name", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      [Required(), StringLength(50, MinimumLength = 3)]
      public string Name { get; set; }

      [Display(Name = "product_poductnumber",ResourceType=typeof(Demo.OData.LangResources.LocalizedStrings))]
      [Required(), StringLength(50, MinimumLength = 3)]
      public string ProductNumber { get; set; }

      [Display(Name = "product_size", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      [Range(0, 100)]
      public int Size { get; set; }

      [Display(Name = "product_color", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      public string Color { get; set; }

      [Display(Name = "product_standardcost", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      public decimal StandardCost { get; set; }
    
      [Display(Name = "product_listprice", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      public decimal ListPrice { get; set; }
      
      [Display(Name = "product_weight", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      public decimal Weight { get; set; }
      
      [Display(Name = "product_sellstartdate", ResourceType = typeof(Demo.OData.LangResources.LocalizedStrings))]
      public DateTime SellStartDate { get; set; }

    }
  }
}
